#define _CRT_SECURE_NO_WARNINGS 1
#include <vector>
using namespace std;
class Solution {
public:
    void moveZeroes(vector<int>& nums)
    {
        int j = 0;
        for (int i = 0;i < nums.size();++i)
        {
            if (nums[i] != 0)
            {
                nums[j++] = nums[i];
            }
        }
        for (int i = j;i < nums.size();++i)
        {
            nums[i] = 0;
        }
    }
};